<%= render :partial => 'admin/shared/cms_left_bar', :locals => { :on => 1 } %>

<div id="main">
  <div class="box">
    <form class="border p10 th" action="/admin/recommend_subjects" method="get">
      <label>编号：
        <input type="text" name="id" value="<%= params[:id] %>"/>
      </label>
      &nbsp;&nbsp;
      <label>主题：
        <input type="text" name="title" value="<%= params[:title] %>"/>
      </label>
      &nbsp;&nbsp;
      <label>类型：
        <%= select_tag :flag, options_for_recommed_subject(params[:flag]) %>
      </label>
      &nbsp;&nbsp;
      <input class="submit btt90 bttb" type="submit" value="查询" />
      <input class="submit btt90 bttb" type="reset" value="重置" />
    </form>
  </div>

  <div class="box">
    <% form_for :recommend_subject, :url => update_status_admin_recommend_subjects_path, :html => { :method => :put, :id => 'update_status' } do |f| -%>
    <table width="96%" class="table border">
      <tr>
        <td height="35" colspan="9">
          <%= hidden_field_tag :status -%>
          <a class="btt bttb update_status" rel="-1">删除</a>
        </td>
      </tr>
      <tr>
        <th width="15"><input type="checkbox" id="check_all"></th>
        <th width="38">编号</th>
        <th width="80">主题</th>
        <th width="48">类型</th>
        <th width="48">排序</th>
        <th width="120">创建时间</th>
        <th width="120">修改时间</th>
        <th width="20">操作</th>
      </tr>
      <% for recommend_subject in @recommend_subjects -%>
        <tr class="<%= cycle('', 'tr2') %>">
          <td>
            <input type="checkbox" class="check" name="ids[]" value="<%= recommend_subject.id %>">
          </td>
          <td><%= recommend_subject.id %></td>
          <td><%= link_to recommend_subject, edit_admin_recommend_subject_path(recommend_subject) %></td>
          <td><%= recommend_subject.display_flag %></td>
          <td><%= recommend_subject.sort_order %></td>
          <td><%= recommend_subject.created_at %></td>
          <td><%= recommend_subject.updated_at %></td>
          <td><%= link_to '管理', edit_admin_recommend_subject_path(recommend_subject) %></td>
        </tr>
      <% end -%>
    </table>
    <% end -%>
  </div>
  <%= will_paginate @recommend_subjects -%>
</div>

<%= javascript_include_tag 'admin/base' -%>
